﻿using System;
using System.Collections.Generic;
using System.Text;
using TheCell;

namespace Unused
{
    class C_test
    {
        public static void C (Dictionary<int, List<Cell>> Lines, Dictionary<int, List<Cell>> Columns, Dictionary<int, List<Cell>> Area)
        {
            CombinationDictionary = Combination(Lines, Columns, Area);
        }
        public static Dictionary<int, List<List<Cell>>> CombinationDictionary
        {
            get;
            private set;
        }
        private static Dictionary<int,List<List<Cell>>> Combination(Dictionary<int, List<Cell>> Lines, Dictionary<int, List<Cell>> Columns, Dictionary<int, List<Cell>> Areas)
        {
            Dictionary<int, List<List<Cell>>> combination = new Dictionary<int, List<List<Cell>>>();
            
            return combination;
        }
    }
}
/*
namespace Unused
{
    class C_test
    {
        public void combination()
        {
            Dictionary<int, List<List<Cell>>> combination = new Dictionary<int, List<List<Cell>>>();
            //int = count-i（一组取多少个数）
            List<List<Cell>> mindem = new List<List<Cell>>();
            //mindem,count=在取count-i个数时有多少个possible
            List<Cell> possible = new List<Cell>();
            //一组possible的内容
            int count = 0;
            foreach (Cell cell in cells)
            {
                if (cell.Possible.Count > 1)
                {
                    count++;
                }   
            }
            for (int i = 0; count - i > 2; i++)
            {
                foreach (Cell cell in cells)
                {
                    if (!possible.Contains(cell) && cell.Possible.Count > 1)
                    {
                        possible.Add(cell);
                    }
                }
                mindem.Add(possible);
                combination.Add(count - i, mindem);
            }
        }
    }
}
*/

/*using System;
using System.Collections.Generic;
namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(P1(6, 3));
            Console.WriteLine(P2(6, 3));
            Console.WriteLine(C(6, 2));
        }

        /// <summary>
        /// 排列循环方法
        /// </summary>
        /// <param name="N"></param>
        /// <param name="R"></param>
        /// <returns></returns>
        static long P1(int N, int R)
        {
            if (R > N || R <= 0 || N <= 0) throw new ArgumentException("params invalid!");
            long t = 1;
            int i = N;

            while (i != N - R)
            {
                try
                {
                    checked
                    {
                        t *= i;
                    }
                }
                catch
                {
                    throw new OverflowException("overflow happens!");
                }
                --i;
            }
            return t;
        }

        /// <summary>
        /// 排列堆栈方法
        /// </summary>
        /// <param name="N"></param>
        /// <param name="R"></param>
        /// <returns></returns>
        static long P2(int N, int R)
        {
            if (R > N || R <= 0 || N <= 0) throw new ArgumentException("arguments invalid!");
            Stack<int> s = new Stack<int>();
            long iRlt = 1;
            int t;
            s.Push(N);
            while ((t = s.Peek()) != N - R)
            {
                try
                {
                    checked
                    {
                        iRlt *= t;
                    }
                }
                catch
                {
                    throw new OverflowException("overflow happens!");
                }
                s.Pop();
                s.Push(t - 1);
            }
            return iRlt;
        }

        /// <summary>
        /// 组合
        /// </summary>
        /// <param name="N"></param>
        /// <param name="R"></param>
        /// <returns></returns>
        static long C(int N, int R)
        {
            return P1(N, R) / P1(R, R);
        }
    }

}*/